package de.szut.ita13sommerfeld.apacheanalyser.apachelog;

import de.szut.ita13sommerfeld.apacheanalyser.apachelog.Date;

/**
 * 
 * @author Rene Sommerfeld
 *
 */

public class Entry {

	private String ip;
	private String hyphen;
	private String id;
	private Date date;
	private String method;
	private String resource;
	private String protocol;
	private int status;
	private int size;
	
	/**
	 * 
	 * @param ip ipadress of an user
	 * @param hyphen 
	 * @param id userid of an user
	 * @param date date (DD/MM/YYYY:HH:MM:SS) log date
	 * @param method the method of the resource request
	 * @param resource the requested resource
	 * @param protocol the used protocol
	 * @param status the status messages 
	 * @param size size of the whole request incl. the resource size
	 */
	
	public Entry(String ip, String hyphen, String id, Date date, String method, String resource, String protocol, int status, int size) {
		this.ip = ip;
		this.hyphen = hyphen;
		this.id = id;
		this.date = date;
		this.method = method;
		this.resource = resource;
		this.protocol = protocol;
		this.status = status;
		this.size = size;
	}

	/**
	 * 
	 * @return returns the ip of an user
	 */
	public String getIp() {
		return ip;
	}

	/**
	 * 
	 * @param ip sets this ip
	 */
	public void setIp(String ip) {
		this.ip = ip;
	}
	/**
	 * 
	 * @return returns the hyphen
	 */
	public String getHyphen() {
		return hyphen;
	}

	/**
	 * 
	 * @param hyphen sets this hyphen
	 */
	public void setHyphen(String hyphen) {
		this.hyphen = hyphen;
	}

	/**
	 * 
	 * @return returns the userid
	 */
	public String getId() {
		return id;
	}

	/**
	 * 
	 * @param id sets this userid
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * 
	 * @return returns the date of the specific action
	 */
	public Date getDate() {
		return date;
	}

	/**
	 * 
	 * @param date sets this date
	 */
	public void setDate(Date date) {
		this.date = date;
	}

	/**
	 * 
	 * @return returns the request method
	 */
	public String getMethod() {
		return method;
	}

	/**
	 * 
	 * @param method sets this request method
	 */
	public void setMethod(String method) {
		this.method = method;
	}

	/**
	 * 
	 * @return returns the requested resource
	 */
	public String getResource() {
		return resource;
	}

	/**
	 * 
	 * @param resource sets this resource
	 */
	public void setResource(String resource) {
		this.resource = resource;
	}

	/**
	 * 
	 * @return returns the used protocol
	 */
	public String getProtocol() {
		return protocol;
	}

	/**
	 * 
	 * @param protocol sets this protocol
	 */
	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}

	/**
	 * 
	 * @return returns the status message
	 */
	public int getStatus() {
		return status;
	}

	/**
	 * 
	 * @param status sets this status message
	 */
	public void setStatus(int status) {
		this.status = status;
	}

	/**
	 * 
	 * @return returns the size of the whole request
	 */
	public int getSize() {
		return size;
	}

	/**
	 * 
	 * @param size sets this size
	 */
	public void setSize(int size) {
		this.size = size;
	}	
}
